import { fetchData } from './manage'

export const GetUsers = fetchData('/users/list')
/** 专业类型管理 */
export const AddProfessionCategories = fetchData('/professionCategories')
export const GetProfessionCategories = fetchData('/professionCategories/list')
export const DelProfessionCategories = fetchData('/professionCategories', 'delete')
export const UpdateProfessionCategories = fetchData('/professionCategories', 'put')

/** 培训视频管理 */
export const AddVideoInfo = fetchData('/video')
export const GetVideoInfo = fetchData('/video/list')
export const GetVideoInfoAll = fetchData('/video/selectAll')
export const DelVideoInfo = fetchData('/video', 'delete')
export const UpdateVideoInfo = fetchData('/video', 'put')

/** 课程教师管理 */
export const AddTeacher = fetchData('/teacher')
export const GetTeacher = fetchData('/teacher/list')
export const DelTeacher = fetchData('/teacher', 'delete')
export const UpdateTeacher = fetchData('/teacher', 'put')
export const AddTeacherUser = fetchData('/teacher/addTeacherUser')

/** 课程目录管理 */
export const AddDirectory = fetchData('/directory')
export const GetDirectory = fetchData('/directory/list')
export const DelDirectory = fetchData('/directory', 'delete')
export const UpdateDirectory = fetchData('/directory', 'put')
export const GetDirectoryTree = fetchData('/directory/tree', 'get')
export const GetDirectoryByCourse = param => fetchData(`/directory/treeByCourseId/${param}`, 'get')
export const GetQuestionsByDirId = directoryId => fetchData(`/videoQuestion/listQuestionsByDirId/${directoryId}`, 'get')
export const SetVideoQuestions = fetchData('/videoQuestion/setVideoQuestions', 'put')

/** 视频文件管理 */
export const FindVideoFile = param => fetchData(`/videoFile/relate/${param}`, 'get')
export const DelVideoFile = param => fetchData(`/videoFile/delete/directoryId/${param}`, 'get')

/** 栏目管理 */
export const AddColumn = fetchData('/column')
export const GetColumn = fetchData('/column/list')
export const DelColumn = fetchData('/column', 'delete')
export const UpdateColumn = fetchData('/column', 'put')

/** 文章管理 */
export const AddArticle = fetchData('/article')
export const GetArticle = fetchData('/article/list')
export const GetArticleById = param => fetchData(`/article/id/${param}`, 'get')
export const DelArticle = fetchData('/article', 'delete')
export const UpdateArticle = fetchData('/article', 'put')
export const PublishArticle = param => fetchData(`/article/publish/${param}`, 'get')
export const RevokeArticle = param => fetchData(`/article/revoke/${param}`, 'get')

/** 政策类型管理 */
export const AddPolicyType = fetchData('/policyType')
export const GetPolicyType = fetchData('/policyType/list')
export const DelPolicyType = fetchData('/policyType', 'delete')
export const UpdatePolicyType = fetchData('/policyType', 'put')

/** 政策管理 */
export const AddPolicy = fetchData('/policy')
export const GetPolicy = fetchData('/policy/list')
export const DelPolicy = fetchData('/policy', 'delete')
export const UpdatePolicy = fetchData('/policy', 'put')
export const GetPolicyById = param => fetchData(`/policy/id/${param}`, 'get')

/** 图片上传 */
export const UploadPic = fetchData('/files/single')
export const DelFile = fetchData('/files', 'delete')

/** 专题管理 */
export const AddQuestionClassification = fetchData('/questionClassification')
export const GetQuestionClassification = fetchData('/questionClassification/list')
export const DelQuestionClassification = fetchData('/questionClassification', 'delete')
export const UpdateQuestionClassification = fetchData('/questionClassification', 'put')

/** 题库管理 */
export const AddQuestion = fetchData('/question')
export const GetQuestion = fetchData('/question/list')
export const DelQuestion = fetchData('/question', 'delete')
export const UpdateQuestion = fetchData('/question', 'put')
export const GetQuestionOption = param => fetchData(`/questionOption/questionId/${param}`, 'get')

/** 模拟考试记录管理 */
export const AddTestRecord = fetchData('/testRecord')
export const GetTestRecord = fetchData('/testRecord/list')
export const DelTestRecord = fetchData('/testRecord', 'delete')
export const UpdateTestRecord = fetchData('/testRecord', 'put')

/** 答题记录管理 */
export const AddTestRecordDetail = fetchData('/testRecordDetail')
export const GetTestRecordDetail = fetchData('/testRecordDetail/list')
export const DelTestRecordDetail = fetchData('/testRecordDetail', 'delete')
export const UpdateTestRecordDetail = fetchData('/testRecordDetail', 'put')

/** 考试指导管理 */
export const AddExamGuide = fetchData('/examGuidance')
export const GetExamGuide = fetchData('/examGuidance/list')
export const DelExamGuide = fetchData('/examGuidance', 'delete')
export const UpdateExamGuide = fetchData('/examGuidance', 'put')

/** 公告管理 */
export const AddAnnouncement = fetchData('/announcement')
export const GetAnnouncement = fetchData('/announcement/list')
export const DelAnnouncement = fetchData('/announcement', 'delete')
export const UpdateAnnouncement = fetchData('/announcement', 'put')

/** 通知管理 */
export const AddNotice = fetchData('/notice')
export const GetNotice = fetchData('/notice/list')
export const DelNotice = fetchData('/notice', 'delete')
export const UpdateNotice = fetchData('/notice', 'put')
export const PublishNotice = fetchData('/notice/publish')
export const WithdrawNotice = fetchData('/notice/withdraw')

/** 通知状态管理 */
export const GetUnReadUser = fetchData('/notice/unreadUser')

/** 证件管理 */
export const GetCertificates = fetchData('/certificates/list')
export const DelCertificates = fetchData('/certificates', 'delete')
export const UpdateCertificates = fetchData('/certificates', 'put')

/** 资料管理 */
export const AddUserData = fetchData('/userData')
export const GetUserData = fetchData('/userData/list')
export const GetUserDataByUsername = param => fetchData(`/userData/getByUsername/${param}`, 'get')
export const DelUserData = fetchData('/userData', 'delete')
export const UpdateUserData = fetchData('/userData', 'put')

/** 履职管理 */
export const AddCareer = fetchData('/careerInfo')
export const GetCareer = fetchData('/careerInfo/list')
export const GetCareerByUsername = fetchData('/careerInfo/findCareerInfo')
export const DelCareer = fetchData('/careerInfo', 'delete')
export const UpdateCareer = fetchData('/careerInfo', 'put')

/** 培训记录管理 */
export const AddCourseRecord = fetchData('/courseRecord')
export const GetCourseRecord = fetchData('/courseRecord/list')
export const DelCourseRecord = fetchData('/courseRecord', 'delete')
export const UpdateCourseRecord = fetchData('/courseRecord', 'put')

/** 试卷管理 */
export const AddExamPaper = fetchData('/examPaper')
export const GetExamPaper = fetchData('/examPaper/list')
export const DelExamPaper = fetchData('/examPaper', 'delete')
export const UpdateExamPaper = fetchData('/examPaper', 'put')
export const GenerateExamPaper = fetchData('/examPaper/generate')

/** 字典管理 */
export const AddDictionary = fetchData('/dict')
export const GetDictionary = fetchData('/dict/list')
export const DelDictionary = fetchData('/dict', 'delete')
export const UpdateDictionary = fetchData('/dict', 'put')

/** 字典明细管理 */
export const AddDictItem = fetchData('/dictItem')
export const GetDictItem = fetchData('/dictItem/list')
export const DelDictItem = fetchData('/dictItem', 'delete')
export const UpdateDictItem = fetchData('/dictItem', 'put')
export const GetDictItemByDictCode = param => fetchData(`/dictItem/dictCode/${param}`, 'get')

/** 试卷题目管理 */
export const GetExamPaperQuestion = fetchData('/examPaperQuestion/list')
export const GetExamPaperOption = fetchData('/examPaperOption/questionId')
